package com.worthtech.billportal.dao.hibernate;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.worthtech.billportal.bean.Permission;
import com.worthtech.billportal.dao.PermissionDAO;

public class PermissionHibernateDAO extends HibernateDaoSupport implements PermissionDAO {

	public List getPermissionList(int menuId) {
		return this.getHibernateTemplate().find("from Permission where moduleId = ?",new Integer(menuId));
	}

	public Permission getPermission(int id) {
		return (Permission)this.getHibernateTemplate().get(Permission.class,new Integer(id));
		
	}

}
